//
//  XYImageScrollViewModel.h
//  MuBao
//
//  Created by 找汽配 on 2018/1/26.
//  Copyright © 2018年 Stardust. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

@protocol XYImageScrollViewModelAction;
@protocol XYImageScrollViewModelDelegate;

@interface XYImageScrollViewModel : NSObject

@property (nonatomic, strong) UIImage * image;
@property (nonatomic, copy) NSString * imageURL;
@property (nonatomic, weak) id<XYImageScrollViewModelAction> action; // 代理ScrollView
@property (nonatomic, weak) id<XYImageScrollViewModelDelegate> delegate; // 代理ScrollViewCell

+ (instancetype)model;

- (void)reloadImage;
- (void)modelDidUpdate;

@end

@protocol XYImageScrollViewModelAction <NSObject>

/** 该代理用于重新获取图片 */
- (void)imageScrollViewModelReloadImage:(XYImageScrollViewModel *)model;

@end

@protocol XYImageScrollViewModelDelegate <NSObject>

- (void)imageScrollViewModelDidUpdate;

@end
